<?php


namespace app\admin\model;


use think\Model;

class Bclass extends Model
{protected $table='dc_bclass';
public function getBinfo(){
    return $this->order('orderno asc')->paginate(5);
}
public function addImg($file){
    return $this->save($file,'pic');
}
public function getInfo(){
    return $this->field('id,bname')->select();
}
public function getOne($no){
    return $this->where('id',$no)->find();
}
    public function updateBclass($data){
        return $this->isUpdate(true)->save($data);
    }
public function delBclass($id){
return $this->where('id',$id)->delete();
}
public function getName($pid){
    return $this->where('id',$pid)->find();
}
}